<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Promise的链式调用（二）</title>
</head>
<body>
<script>
  new Promise((resolve, reject) => {
    // 第一次网络请求
    setTimeout(() => {
      console.log('第一次网络请求');
      resolve(1)
    }, 1000)
  }).then((res) => {
    console.log(res);
    return Promise.resolve(res+1)
  }).then(res=>{
    console.log(res);
    return Promise.reject(res+1)
  }).then(res=>{
    console.log(res);
  }).catch(err=>{
    console.log('Exception-->'+err);
  })
</script>
</body>
</html>
